{% extends 'management.html' %}
{% load i18n %}
	


{% block content %}
  <script type="text/javascript" src="/res/js/tiny_mce/tiny_mce.js"></script>
  <script type="text/javascript">
		initTiny();
  </script>
  
	<div id="detail">
		<form action='/admin/editnote/' method='post' name='addNote'>
			<input name="id" type="hidden" value="{{note.key.id}}"/>
			<p>
				{% trans "Title" %}:<input name='title' type='text' size=50 value="{{note.title}}"/>
			</p>
			<p>{% trans "Public" %}:
				{% if note.isPublic %}
					<input name='isPublic' type='checkbox' value="True" checked="checked"/>
				{% else %}
					<input name='isPublic' type='checkbox' value="True"/>
				{% endif %}
			</p>
			
			<p>
				{% trans "Category" %}:
					<select name="category">
					{% for category in categories%}
						{% ifequal category.name note.jumCategory.name %}
							<option selected="selected">{{category.name}}</option>
						{% else %}
							<option>{{category.name}}</option>
						{% endifequal %}
					{% endfor %}
					</select>
			</p>
			<p>{% trans "Location" %}:
							<input name='writeLocation' type='text' size="50"  value="{{location}}"/>
			</p>
			<p>{% trans "Tag" %}:
				<input name='tags' type='text' size="50"  value="{{tags}}" />
			</p>
			
			<p>{% trans "Content" %}:
					<textarea id="content"  class="mceEditor" name="content" rows="20" cols="45" >
					{{note.content}}
					</textarea>
			</p>
			<p class="subbutton">
				<input type='submit' value='{% trans "OK" %}' />
				<input type='reset' value='{% trans "Cancel" %}' /> 
			</p>
		</form>

	</div>
		
{% endblock content %}

